package edu.sctu.practice.zhengsenwen.test.test09;

import java.util.Scanner;

/**
 * Created by zhengsenwen on 2015/11/12.
 */
public class Main {

    //    在建立类的实例时，把以上三个信息都作为构造函数的参数输入，
//    其中用户ID和用户密码时必须的，缺省的email地址是用户ID加上字符串"@gameschool.com"

    public static void main(String[] args) {
        InternetUsers internetUsers = new InternetUsers();

        Scanner scanner = new Scanner(System.in);
        System.out.println("ID input:");
        internetUsers.ID = scanner.nextInt();
        System.out.println("password input:");
        internetUsers.password = scanner.next();

        System.out.println("email input:");
        internetUsers.email = scanner.next();
        if (internetUsers.email == "") {
            internetUsers.email = internetUsers.ID + "@gameschool.com";
            System.out.println(internetUsers.email);
        }

        System.out.println(internetUsers.ID);
        System.out.println(internetUsers.password);
        System.out.println(internetUsers.email);

    }
}
